# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=emacs-ace-window
pkgver=0.10.0_git20220911
_gitrev=77115afc1b0b9f633084cf7479c767988106c196
pkgrel=0
_pkgreal=ace-window
pkgdesc="Quickly switch windows in Emacs"
url="https://github.com/abo-abo/ace-window"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	emacs-avy
	"
makedepends="emacs-nox"
source="https://github.com/abo-abo/ace-window/archive/$_gitrev/emacs-ace-window-$_gitrev.tar.gz"
builddir="$srcdir/$_pkgreal-$_gitrev"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
b159413cb2848907c7d8bce5c685c58314f6e52fca2368305f609690c03b1073ca0e067624390524e4d6b0452dca674509d8f6cb4b80571699d7c0b48be9eb8c  emacs-ace-window-77115afc1b0b9f633084cf7479c767988106c196.tar.gz
"
